<?php

Class phongtroController Extends baseController {

public function index() 
{
        $order = 1;
        $start = 1;
        $length =10;
        if(isset($_REQUEST["order"]))
        {
            $order = intval($_REQUEST["order"]);
        }
        $roomDAO = CreateObject("Model_DAO_Room");
        $rooms = $roomDAO->lists($order,$start,$length);
        $this->registry->template->rooms = $rooms;
        $this->registry->template->roomDAO = $roomDAO;
        if($this->registry->mobile == "true")
        {
            $this->registry->template->show('phongtro_index_mobile');
        }
        else
        {
            $this->registry->template->show('phongtro_index');
        }
}


public function view(){

	$this->registry->template->show('phongtro_view');
}

}
?>
